import axiosServer from "@/Ulits/request";
//登录
export const requestMyList = ( username,password)=>{
    return axiosServer({
        method:'post',
        url:'/api/login',
        data:{
           username,
           password
        }
    })
}
//注册
export const requestAddMy = ( formData)=>{
    return axiosServer({
        method:'post',
        url:'/api/register',
        data:formData,
        headers: {'Content-Type':'multipart/form-data'},
    })
}

// 验证码
export const RequestVerifyCode=()=>{
    return axiosServer({
        method:'get',
        url:'/api/verifyCode',
    })
}

// 效验验证码
export const RequestCheckCode=()=>{
    return axiosServer({
        method:'get',
        url:'/api/checkCode',
    })
}

/**
 * 动态菜单
 */
 export const RequestMenuList = (roleId)=>{
    return axiosServer({
        method:'get',
        url:'api/system/menus',
        params:{
            roleId
        }
    })
}

/**
 * 资源权限
 */
 export const RequestResources = (roleId)=>{
    return axiosServer({
        method:'get',
        url:'api/system/resource',
        params:{
            roleId
        }
    })
}